package org.itheima.pojo;

import jakarta.validation.constraints.Pattern;

public class LoginRequest {
    @Pattern(regexp = "^\\S{5,16}$", message = "用户名格式不正确")
    private String username;

    @Pattern(regexp = "^\\S{5,16}$", message = "密码格式不正确")
    private String password;

    // Getter 和 Setter
    public String getUsername() {
        return username;
    }

    public void setUsername(String username) {
        this.username = username;
    }

    public String getPassword() {
        return password;
    }

    public void setPassword(String password) {
        this.password = password;
    }
}
